<div id="corps">
<?php
print "<h1>Upload de photos</h1>";

/*
 * Mise en place du formulaire
 * L'ajout de nouvelles photos par
 * Hotlink et par Upload sont deux forms différents
 */

// Hotlink

print "<form id='hotlinkFormId' method='POST' action='index.php?controller=uploadPhoto&action=hotlinkFile'>";
print "Adresse de l'image à récupérer : <input name='hotlinkURL' type='text' width='250'/>\n";
print "Catégorie : ";
print "<select name='filtreCategorie'>\n";
foreach ($data->categorieList as $cat) {
	print "<option value='".$cat."' ".(($data->categorie==$cat)?'selected':'').">".$cat."</option>\n";
}
print "</select>\n";
print "<input type='submit' value='Valider' />";
print "</form>";
print "<hr/>";
// Upload d'images
print "<form id='uploadFormId' method='POST' action='index.php?controller=uploadPhoto&action=uploadFile' enctype='multipart/form-data'>";
print "Fichier à uploader : <input name='file' type='file' width='250'/>\n";
print "Catégorie : ";
print "<select name='filtreCategorie'>\n";
foreach ($data->categorieList as $cat) {
	print "<option value='".$cat."' ".(($data->categorie==$cat)?'selected':'').">".$cat."</option>\n";
}
print "</select>\n";
print "<input type='submit' value='Valider' />";
print "</form>";
print $data->upload_error;

?>
</div>